<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored ="false"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>北京市电子行政监察平台-表字段管理</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="<%=path%>/css/base.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/frame.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			var path = "<%=path%>";
		</script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery-1.6.1.min.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/init.js"></script>
		<style type="text/css">
			div {
				position: static;
			}
		</style>
	</head>
	<body>
		<div id="mainPage" class="surround-layout">
			<jsp:include page="/jsp/frame/top.jsp" flush="true"></jsp:include>
			<div class="middle">
				<!-- 右侧内容输出 -->
				<div class="right">
					<div class="right-all-content">
						<form method="post" action="<%=path%>/web/updateMetaDataFieldsAction.action">
						    <input type="hidden" name="metaDataTableId" value=${metaDataTableId}>
							<div class="content-line-wrap">
							    <input type="hidden" name="dataSourceInfoId" value="${dataSourceInfoId}">
								<div class="content-line-left content-line">
									<h1 class="content-title">工商企业注册数据库-用户表</h1>
								</div>
								<div class="content-line-right content-line">
									<input type="submit" value="保存" class="special originate"/>
								</div>
							</div>
							<div id="dataTable" class="right-content">
								<table cellspacing="0" class="data-table">
									<thead>
										<tr>
											<th class="data-head">字段名称</th>
											<th class="data-head">数据类型</th>
											<th class="data-head">数据长度</th>
											<th class="data-head">是否主键</th>
											<th class="data-head">实体属性名称</th>
											<th class="data-head">实体属性类型</th>
											<th class="data-head">列表页面是否显示</th>
											<th class="data-head">详细页面是否显示</th>
											<th class="data-head">页面显示名称</th>
											<th class="data-head">页面显示形式</th>
											<th class="data-head">页面显示宽度</th>
											<th class="data-head">引用表</th>
											<th class="data-head">引用显示字段</th>
										</tr>
									</thead>
									<tbody>
									    <% 
									       String classType = "odd"; 
									    %>
									    <s:iterator value="metaDataFieldDtos" status="val" >
										    <s:if test="#val.odd == true">
										       <% 
										          classType = "odd"; 
										       %>
										    </s:if>
										    <s:if test="#val.even == true">
										       <% 
										          classType = "even"; 
										       %>
										    </s:if>
										    <s:if test="#val.first == true">
										       <% 
										          classType = "first "+ classType; 
										       %>
										    </s:if>
										    <s:elseif test="#val.last == true">
										       <% 
										          classType = "last " + classType; 
										       %>
										    </s:elseif>
										    <tr class="<%=classType %>">
											<td>
											    <input type ="hidden" name="metaDataFieldDtos[#val.index].metaDataFieldId" value="<s:property value ="metaDataFieldId"/>"/>
											    <input type ="hidden" name="metaDataFieldDtos[#val.index].version" value="<s:property value ="version"/>"/>
											    <input type ="hidden" name="metaDataFieldDtos[#val.index].colName" value="<s:property value ="colName"/>"/>
												<input type ="hidden" name="metaDataFieldDtos[#val.index].colType" value="<s:property value ="colType"/>"/>
												<input type ="hidden" name="metaDataFieldDtos[#val.index].colWidth" value="<s:property value ="colWidth"/>"/>
												<input type ="hidden" name="metaDataFieldDtos[#val.index].isPk" value="<s:property value ="isPk"/>"/>
												<s:property value ="colName"/>
											</td>
											<td>
												<s:property value ="colType"/>
											</td>
											<td>
												<s:property value ="colWidth"/>
											</td>
											<td>
												<s:property value ="isPk"/>
											</td>
											<td>
												<input type="text" name="metaDataFieldDtos[#val.index].privateName" value="<s:property value ="privateName"/>"/>
											</td>
											<td>
												<input type="text" name="metaDataFieldDtos[#val.index].fieldType" value="<s:property value ="fieldType"/>"/>
											</td>
											<td>
											    <s:if test="pageShow ==true">
											    <input value="" type="checkbox" checked="checked"/>显示
											    </s:if>
											    <s:else><input value="" type="checkbox"/>显示</s:else>
											</td>
											<td>
											    <s:if test="detailShow ==true">
											    <input value="" type="checkbox" checked="checked"/>显示
											    </s:if>
											    <s:else><input value="" type="checkbox"/>显示</s:else>
											</td>
											<td>
												<input type="text" name="metaDataFieldDtos[#val.index].fieldNameCN" value="<s:property value ="fieldNameCN"/>"/>
											</td>
											<td>
												<select>
													<option>
														文本
													</option>
													<option>
														链接
													</option>
												</select>
											</td>
											<td>
												<input value="30%" type="text"/>
											</td>
											<td>
												<input value="30%" type="text"/>
											</td>
											<td>
												<input value="30%" type="text"/>
											</td>
										</tr>
									    </s:iterator>
										
									</tbody>
								</table>
							</div>
						</form>
					</div>
				</div>
				<!-- 右侧内容区 -->
			</div>
		</div>
	</body>
</html>